<template>
  <ScaleView>
    <div class="container">
      <div class="top">
        <div class="left">芜湖金牛电气股份有限公司</div>
        <div class="center" @click="toScreen()">WMS监控大屏</div>
        <div class="right" style="padding-left: 50px;">
          <span>{{ today }}</span>
          <span>{{ week }}</span>
          <span>{{ time }}</span>
          <!-- <span>大屏</span> -->
        </div>
      </div>
      <div class="bottom">
        <div class="box1">
          <div class="title">
            <p>入库记录</p>
          </div>
          <div class="list" @click="gotolog">
            <div class="list-item" v-for="item in inLogList" :key="item.id">
              <div class="skuName">{{item.skuName}}</div>
              <div class="number">{{item.number}}{{item.unit}}</div>
            </div>
          </div>
        </div>
        <div class="box-center">
          <!-- <h1 style="font-size: 30px;font-weight: bold;">2132313213</h1> -->
          <div class="box2">
            <div class="top-area">
              <div class="center" id="barCharts" style="width: 440px;height: 330px;border: solid 1px #1D7EF2;"> </div>
              <div class="right-area">
                <div class="rightListArea">
                  <div class="list-container">
                    <div class="list" @click="gotoProject">
                      <div class="list-box ">
                        <div class="list-item" v-for="(item, index) in totalUnFinish" :key="index + '01'">
                          <div class="name2">{{ item.projectName }}</div>
                          <div style="width: 440px;display: flex;flex-direction: row;align-items: center;justify-content: space-around;padding: 10px;border-top: dashed 1px #1D7EF2;" v-for="good in item.orderGoodsList">
                            <div style="color: #FFFFFF;flex:1;font-size: 14px;">{{ good.skuName }}</div>
                            <div style="color: #FFFFFF;width: 90px;text-align: center;font-size: 14px;">{{ good.numberCheck }}</div>
                            <div style="color: #FFFFFF;width: 90px;text-align: center;font-size: 14px;">{{ good.number1 }}</div>
                          </div>
                        </div>
                      </div>
                      <div class="list-box ">
                        <div class="list-item" v-for="(item, index) in totalUnFinish" :key="index + '02'">
                          <div class="name2">{{ item.projectName }}</div>
                          <div style="width: 440px;display: flex;flex-direction: row;align-items: center;justify-content: space-around;padding: 10px;border-top: dashed 1px #1D7EF2;" v-for="good in item.orderGoodsList">
                            <div style="color: #FFFFFF;flex: 1;font-size: 14px;">{{ good.skuName }}</div>
                            <div style="color: #FFFFFF;width: 90px;text-align: center;font-size: 14px;">{{ good.numberCheck }}</div>
                            <div style="color: #FFFFFF;width: 90px;text-align: center;font-size: 14px;">{{ good.number1 }}</div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="box-bottom">
            <div class="box3">
              <div class="title">
                <p>库存预警</p>
              </div>
              <div class="list" @click="gotoInventory">
                <div class="list-box" :class="alertList.length > 6 ? '' : ''">
                  <div class="list-item" v-for="item in alertList" :key="item.id + '1'">
                    <div class="name" style="">{{ item.skuName }}</div>
                    <div class="value" style="">{{ item.number + item.unit }}</div>
                  </div>
                </div>
                <div class="list-box" :class="alertList.length > 6 ? '' : ''">
                  <div class="list-item" v-for="item in alertList" :key="item.id + '2'">
                    <div class="name" style="">{{ item.skuName }}</div>
                    <div class="value" style="">{{ item.number + item.unit }}</div>
                  </div>
                </div>
              </div>
            </div>
            <div class="box3">
              <div class="title">
                <p>未到货告警</p>
              </div>
              <div class="list">
                <div class="list-box" style="height: 600px;">
                  <div class="list-item" v-for="item in purchaseList" :key="item.id">
                    <div class="name">{{`(${item.originalNo})${item.supplierName || '暂估供应商'}`}}</div>
                    <div class="value">未完成</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="box1">
          <div class="title">
            <p>出库记录</p>
          </div>
          <div class="list" @click="gotolog">
            <div class="list-item" style="cursor: pointer;" v-for="item in outLogList" :key="item.id">
              <div class="skuName">{{item.skuName}}</div>
              <div class="number">{{item.number}}{{item.unit}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </ScaleView>
</template>

<script lang="ts" src="./index" />

<style scoped lang="scss">
.container {
  width: 1920px;
  height: 1080px;
  background-color: #011863;
  .top {
    padding: 0 50px;
    height: 90px;
    background-image: url('~@/assets/image/top.png');
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: row;
    align-items: center;
    .left, .right {
      flex: 1;
      padding: 0 50px;
      font-size: 30px;
      font-weight: 500;
      color: #ffffff;
      span {
        padding-right: 15px;
        &:last-child {
          padding-right: 0;
        }
      }
    }
    .center {
      width: 800px;
      text-align: center;
      font-size: 60px;
      font-weight: 500;
      color: #ffffff;
    }
  }

  .bottom {
    padding: 30px 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    .box1 {
      width: 411px;
      height: 923px;
      margin: 0 15px;
      background: #073B89;
      border-radius: 5px;
      overflow: hidden;
      .title {
        padding: 10px;
        display: flex;
        flex-direction: row;
        align-items: center;
        background: #154A89;
        border-bottom: solid #ffffff 1px;
        p {
          font-size: 28px;
          font-weight: 600;
          color: #FFFFFF;
          &:before {
            content: '';
            width: 0;
            height: 0;
            border: 5px solid transparent;
            border-left: 5px solid #1D7EF2;
            margin-right: 10px
          }
        }
      }
      .list {
        width: 100%;
        overflow-x: hidden;
        padding: 10px;
        .list-item {
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: space-around;
          height: 70px;
          border-bottom: solid #1D7EF2 1px;
          cursor: pointer;
          &:last-child {
            border: 0;
          }
          .skuName {
            width: 300px;
            font-size: 16px;
            color: #FFFFFF;
          }
          .number {
            text-align: center;
            flex: 1;
            font-size: 16px;
            color: #FFFFFF;
          }
        }
      }
    }
    .box-center {
      flex: 1;
      padding: 0 10px;
      .box2 {
        height: 350px;
        padding: 40px 20px;
        padding-bottom: 30px;
        background-image: url('~@/assets/image/box2.png');
        background-size: contain;
        background-repeat: no-repeat;
        .top-area {
          display: flex;
          flex-direction: row;
          // justify-content: space-between;
          .right-area {
            display: flex;
            flex-direction: column;
            width: 440px;
            height: 310px;
            .rightListArea {
              // width: 460px;
              height: 320px;
              .list-container {
                width: 100%;
                height: 320px;
                border: solid #1D7EF2 1px;
                padding: 5px;
                overflow: hidden;
                position: relative;
                .list {
                  position: absolute;
                  width: 460px;
                  height: 400px;
                  overflow-x: hidden;
                  .list-box {
                    // width: 460px;
                    height: auto;
                    // &:hover{
                    //   animation-play-state:paused;
                    // }
                    .list-item {
                      display: flex;
                      flex-direction: column;
                      // align-items: left;
                      justify-content: center;
                      padding: 2px;
                      // height: 45px;
                      border-bottom: solid 1px #1D7EF2;
                      cursor: pointer;
                      // .name1 {
                      //   flex: 1;
                      //   font-size: 18px;
                      //   padding: 20px 0;
                      //   color: #25FF13;
                      // }
                      .name2 {
                        flex: 1;
                        font-size: 24px;
                        padding-top: 20px;
                        color: #FF5810;
                      }
                    }
                  }
                }
              }
            }

            // .box4 {
            //   padding: 10px;
            //   background: #154A89;
            //   border: solid #1D7EF2 1px;
            //   border-radius: 2px;
            //   text-align: center;
            //   .value {
            //     height: 40px;
            //     line-height: 40px;
            //     color: #FFFFFF;
            //     font-size: 32px;
            //     font-weight: 600;
            //   }
            //   .name {
            //     height: 30px;
            //     line-height: 30px;
            //     color: #FFFFFF;
            //     font-size: 20px;
            //     font-weight: 500;
            //   }
            // }
            .box-bottom {
              margin-top: 15px;
              display: flex;
              flex-direction: row;
              align-items: center;
              justify-content: space-between;
              .box5 {
                padding: 10px;
                background: #154A89;
                border: solid #1D7EF2 1px;
                border-radius: 2px;
                text-align: center;
                margin-right: 10px;
                &:last-child {
                  margin: 0;
                }
                .value {
                  height: 40px;
                  line-height: 40px;
                  color: #FFFFFF;
                  font-size: 32px;
                  font-weight: 600;
                }
                .name {
                  height: 30px;
                  line-height: 30px;
                  color: #FFFFFF;
                  font-size: 20px;
                  font-weight: 500;
                }
              }
            }
          }
          .center {
            margin: 0 10px;
          }
        }

        .bottom-area {
          // border: solid #FFFFFF 1px;
          height: 120px;
          margin: 10px 0;
        }
      }
      .box-bottom {
        margin-top: 15px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;

        .box3 {
          margin-right: 20px;
          flex: 1;
          height: 490px;
          background: #073B89;
          overflow: hidden;
          position: relative;
          &:last-child {
            margin: 0;
          }
          .title {
            padding: 10px;
            display: flex;
            flex-direction: row;
            align-items: center;
            background: #154A89;
            border-bottom: solid #ffffff 1px;
            position: relative;
            z-index: 99;
            p {
              font-size: 28px;
              font-weight: 600;
              color: #FFFFFF;
              &:before {
                content: '';
                width: 0;
                height: 0;
                border: 5px solid transparent;
                border-left: 5px solid #1D7EF2;
                margin-right: 10px
              }
            }
          }
          .list {
            width: 460px;
            height: 400px;
            position: absolute;
            overflow-x: hidden;
            .list-box {
              width: 460px;
              padding: 0 8px;
              height: auto;
              // overflow-y: hidden;
              .list-item {
                height: 50px;
                padding: 10px 0;
                display: flex;
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
                // box-sizing: border-box;
                border-bottom: solid #1D7EF2 1px;
                cursor: pointer;
                .name {
                  flex: 1;
                  font-size: 16px;
                  color: #FFFFFF;
                }
                .value {
                  width: 80px;
                  font-size: 16px;
                  color: #FFFFFF;
                  text-align: center;
                }
              }
            }
          }
        }
      }
    }
  }
}

.loopAnimation {
  animation: loop 300s linear infinite;

}


.loopAnimation2 {
  animation: loop 100s linear infinite;
}

@keyframes loop {
  0%{
    transform: translateY(0);
  }100%{
    transform: translateY(-100%);
  }

}

::-webkit-scrollbar {
  width: 0; /* 隐藏滚动条宽度 */
  height: 0;
}
</style>
